<template>
  <el-dialog
    v-el-drag-dialog
    class="ReceiptsDetailDialog"
    title="单据明细"
    :visible.sync="isShow"
    width="1100px"
    append-to-body
    @closed="close"
  >
    <iframe
      frameborder="0"
      width="100%"
      height="100%"
      marginheight="0"
      marginwidth="0"
      scrolling="yes"
      :src="src"
    />
  </el-dialog>
</template>

<script>
  import { monthSettlementMonthlyAmountDetail } from '@/api'
  export default {
    data() {
      return {
        isShow: false,
        src: ''
      }
    },
    methods: {
      show(billCode) {
        this.getURL(billCode)
      },
      async getURL(billCode) {
        const params = {
          billCode: billCode
        }
        const { status, data } = await monthSettlementMonthlyAmountDetail(params)
        if (status === 200) {
          // var menu = $dlh.sysMenu[50105];
          // if (menu) {
          //   var scope = "";
          //   if (menu.btnScope) {
          //     scope += (menu.btnScope >> 10) & 0x01; // 打印
          //     scope += (menu.btnScope >> 9) & 0x01; // 导出
          //   } else {
          //     scope = "11";
          //   }
          //   scope = parseInt(scope, 2);
          //   rlt.data += "&scope=" + scope;
          // }

          this.src = data
          this.isShow = true
        }
      },
      close() {
        this.src = ''
        this.isShow = false
      }
    }
  }
</script>

<style lang="scss" scoped>
.ReceiptsDetailDialog {
  /deep/.el-dialog__body {
    height: 70vh;
  }
}
</style>
